//mutations
import * as types from './types';
import config from '../common/js/config';
const WX_CANCUSTOM = config.WX_CANCUSTOM;
export default {
   [types.SET_USERINFO](state,data){
	   console.log('types.SET_USERINFO');
	   console.log('data',data);
	   if(data){
			uni.setStorageSync('userInfo',data);
	   } else{
		   uni.removeStorageSync('userInfo')
	   }
		state.userInfo = data;
	},
    [types.SET_NETWORK](state,data){
        state.network = data;
    },
    [types.SET_SYSTEMINFO](state,data){
        state.systemInfo = data;
    },
    [types.SET_LOGINROUTE](state,data){
        state.loginRoute = data;
    },
    [types.SET_POSITIONLIST](state,data){
        state.positionList = data;
    },
    [types.SET_YEARLIST](state,data){
        state.yearList = data;
    },
    [types.SET_ADDRESLIST](state,data){
        state.addresList = data;
    },
    [types.SET_INVOICE](state,data){
        state.invoice = data;
    },
    [types.SET_RULES](state,data){
        state.rules = data;
    },
    [types.SET_NEWSCOUT](state,data){
        state.newsCount = data;
    },
    [types.SET_TEAM](state,data){
        state.team = data;
    },
    [types.SET_TYPELIST](state,data){
        state.typeList = data;
    },
    [types.SET_CLIMATELIST](state,data){
        state.climateList = data;
    },
    [types.SET_CLIMATE](state,data){
        state.climate = data;
    },
    [types.SET_BINDMOBILE](state,data){
        state.bindMobile = data;
    },
    [types.SET_USERLEVELS](state,data){
        state.userLevels = data;
    },
    [types.SET_IDTEST](state,data){
        state.idTest = data;
    },
}
